<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>员工管理</title>
    <%@include file="/static/common/common.jsp"%>
    <script src="/static/js/plugins/jquery-easyu/plugins/jquery.form.min.js"></script>
    <script type="text/javascript" src="/static/js/system/layout/employee.js"></script>
</head>
<body>
<table id="emp_datagrid" ></table>
<!--员工的工具栏-->
<div id="tb">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" id="change_btn"data-cmd="changeState">离职</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-tip',plain:true" data-cmd="resetPwd">重置密码</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="reload">刷新</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-redo',plain:true" data-cmd="exportExcel">导出</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-undo',plain:true" data-cmd="importExcel">导入</a>
    用户名: <input type="text" class="easyui-textbox" id="keyword" name="keyword" prompt="请输入用户名或真实姓名"/>
    部门: <input class="easyui-combobox" id="deptId" data-options="
                                        url:'/department/queryDepts',
                                        valueField: 'id',
                                        textField: 'name'
                                       "/>
    入职时间: <input type="text" class="easyui-datebox" id="beginDate" name="beginDate" prompt="请输入开始时间"/> -
    <input type="text" class="easyui-datebox" id="endDate" name="endDate" prompt="请输入结束时间"/>
    <a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true"
       data-cmd="query">Search</a>

</div>

<div id="excel_dialog">
    <form id="excel_form" action="/employee/importExcel" method="post" enctype="multipart/form-data">
        <table style="margin: 20px" align="center">
            <tr>
                <td style="padding-left: 20px;padding-bottom: 5px">
                    <input id="uploadFile" type="file" name="uploadFile" value="上传"/>
                </td>
            </tr>
            <tr>
                <td style="padding-left: 20px;padding-bottom: 5px">
                    <input type="submit" value="提交"/>
                </td>
            </tr>
        </table>
    </form>
</div>

<div id="emp_dialog">
    <form id="edit_form" method="post">
        <input type="hidden" id="empId" name="id">

        <table align="center" style="margin-top: 15px">

            <tr>
                <td>账号</td>
                <td>
                    <input name="username" class="easyui-textbox"  prompt="请输入用户名"
                           invalidMessage="用户名已存在"
                           validType="remote['/employee/validateUsername?id='+empId.value,'username']
                    ">
                </td>
            </tr>

            <tr>
                <td>真名</td>
                <td><input class="easyui-textbox" name="realname" >
                </td>
            </tr>

            <tr id="password_tr">
                <td>密码:</td>
                <td><input type="password" class="easyui-passwordbox" name="password"/>
                </td>
            </tr>

            <tr>
                <td>电话</td>
                <td><input class="easyui-textbox" name="tel" >
                </td>
            </tr>

            <tr>
                <td>邮箱</td>
                <td><input class="easyui-textbox" name="email" >
                </td>
            </tr>

            <tr>
                <td>部门</td>
                <td><input class="easyui-combobox" name="dept.id" data-options="
                    valueField: 'id',textField: 'name', panelHeight:'auto',
                    url:'/department/queryDepts'
                    ">
                </td>
            </tr>

            <tr>
                <td>入职时间</td>
                <td><input class="easyui-datebox" name="inputTime" >
                </td>
            </tr>

            <tr>
                <td>管理员</td>
                <td><input class="easyui-combobox" name="admin" data-options="
                valueField: 'value',textField: 'label', panelHeight:'auto',
                    data:[{
                            label: '是',
                            value: '1'
                        },{
                            label: '否',
                            value: '0'
                        }]
                    ">
                </td>
            </tr>
            <tr>
                <td>角色</td>
                <td><input class="easyui-combobox"  id="roles" data-options="
                valueField: 'id',textField: 'name', panelHeight:'auto',
                   url:'/role/queryRoles', multiple:true">
                </td>
            </tr>
        </table>
    </form>
</div>

<!--员工底部按钮-->
<div id="bb">
    <a href="#" class="easyui-linkbutton" iconCls="icon-save" data-cmd="save">保存</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" data-cmd="cancel">关闭</a>
</div>
</body>
</html>
